import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

import Signin from '@/components/SignIn/SignIn'
//路由懒加载
const Home = () => import(/* webpackChunkName: "Home" */ '@/components/Home/Home')
//权限管理懒加载
const PermissionManage = () => import(/* webpackChunkName: "PermissionManage" */ '@/components/Home/System/Permission/PermissionManage')
const RoleManage = () => import(/* webpackChunkName: "RoleManage" */ '@/components/Home/System/Role/RoleManage')
const UserManage = () => import(/* webpackChunkName: "UserManage" */ '@/components/Home/System/Account/UserManage')
//彩票懒加载
const LotteryManage = () => import(/* webpackChunkName: "LotteryManage" */ '@/components/Home/Lottery/LotteryManage')
const SSQManage = () => import(/* webpackChunkName: "SSQManage" */ '@/components/Home/Lottery/SSQManage/SSQManage')

export default new Router({
  routes: [
  {
      path: '/',
      redirect: {name: 'Home'}   //url转向
  },
  {
      path: '/Home',
      component: Home,
      name: 'Home',
      children: [
        ///Home/PermissionManage
        {path: 'PermissionManage',name:'权限管理',component:PermissionManage},
        {path: 'RoleManage',name:'角色管理',component:RoleManage},
        {path: 'UserManage',name:'用户管理',component:UserManage},
        
        {path: 'LotteryManage',
        name:'彩票列表',
        component:LotteryManage,
        children:[
        	{path: 'SSQManage',name:'双色球',component:SSQManage},
        ]
        },
        
      ]
  },
  {
  	path:'/Signin',
    name:'Signin',
    component:Signin
  }
    
  ]
})
